package com.example.lib_common.router

import android.content.Context
import android.content.Intent
import android.widget.Toast
import com.alibaba.android.arouter.facade.Postcard
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.facade.service.DegradeService

/**
 * @author yaotianxue
 * @description
 * @date 2024/10/23
 */
@Route(path = "/service/degrade")
class DegradeServiceImpl:DegradeService {
    override fun init(context: Context?) {

    }

    override fun onLost(context: Context?, postcard: Postcard?) {
        //页面丢失了，可以跳转到指定页面，页面丢了
        Toast.makeText(context,"页面不见了",Toast.LENGTH_SHORT).show()
        val intent = Intent(context,LostActivity::class.java)
        context?.startActivity(intent)

    }
}